<?php

namespace app\common\validate;

use think\Validate;

class UserRepair extends Validate
{

    /**
     * 验证规则
     */
    protected $rule = [
        'id' => 'require',
        'username' => 'require',
        'phone' => 'require',
        'remark' => 'require',
        'house_id' => 'require',
        'user_id' => 'require',
        'type_id' => 'require',
    ];

    /**
     * 提示消息
     */
    protected $message = [
        "id.require" => "缺少参数id",
        "username.require" => "请输入姓名",
        "phone.require" => "请输入手机号码",
        "remark.require" => "请输入您的需求",
        "house_id.require" => "缺少参数房屋id",
        "user_id.require" => "缺少参数用户id",
        "type_id.require" => "缺少参数类型id",
    ];

    /**
     * 字段描述
     */
    protected $field = [
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'add' => ['username', 'phone', 'remark', 'house_id', 'type_id', 'user_id'],
        'update' => ['id', 'username', 'phone', 'remark', 'house_id', 'type_id', 'user_id'],
    ];

}
